package com.company;
import java.util.Scanner;
public class je {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String fileName=scanner.nextLine();
        String email=scanner.nextLine();

        //请在此添加实现代码
        /********** Begin **********/
        if (fileName.lastIndexOf(".") == -1)
            System.out.println("Java文件名无效");
        else {
            String s = fileName.substring(fileName.lastIndexOf("."), fileName.length());
            if ((s.equals(".java") == false))
                System.out.println("Java文件名无效");
            else
                System.out.println("Java文件名正确");
        }
        int a = email.indexOf('@'), b = email.indexOf('.');

        if (a != -1 && b != -1 && email.lastIndexOf('@') < email.indexOf('.'))
            System.out.println("邮箱名正确");
        else
            System.out.println("邮箱名无效");
    }
}

